package cn.js.sangu.unitStore.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cn.js.sangu.unitStore.entity.DicDz;
import cn.js.sangu.unitStore.mapper.DicDzMapper;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class DicDzService extends ServiceImpl<DicDzMapper, DicDz> {
    /**
     * 定制标准件数据列表
     * 
     * @return 定制标准件数据列表
     */
    public List<DicDz> getDzList() {
        log.info("查询定制标准件数据列表");
        // 使用QueryWrapper按priority字段从高到低排序
        QueryWrapper<DicDz> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("priority");
        return baseMapper.selectList(queryWrapper);
    }

}
